import axios from 'axios'
import a from "./js/a.js";
const input = document.querySelector('input')
const button = document.querySelector('button')
import './index.css'
axios
	.get('/data/data')
	.then(({data}) => {
		console.log(data);
	})
let value;
input.oninput = ({target: {value: targetValue}}) => {
	value = targetValue
}
button.onclick = () => {
	console.log(value)
	console.log(a)
}
// 当我们设置热更新后 module对象上面会生成一个hot对象
// hot 对象当中有一个 accept方法
console.log(module.hot.accept);
if (module.hot) {
	module.hot.accept('./js/a.js', () => {
		button.onclick = () => {
			console.log(value)
			console.log(a)
		}
	})
}
